//
//  DesignerDetailViewController.m
//  BigJoy
//
//  Created by Rowling on 2017/7/12.
//  Copyright © 2017年 Rowling. All rights reserved.
//

#import "DesignerDetailViewController.h"
#import "DesingerDetailHeaderView.h"
#import "PersonInfoCell.h"

@interface DesignerDetailViewController ()

@end

@implementation DesignerDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initData];
    [self setUI];
}

-(void)setUI {
    [self.view addSubview:self.XMTableview];
    self.XMTableview.height -= 50;
    DesingerDetailHeaderView * headView = [DesingerDetailHeaderView fastLogin];
    headView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 440);
    self.XMTableview.tableHeaderView = headView;
    UIButton * btn = [UIButton new];
    [btn setImage:[UIImage imageNamed:@"fenxiang_hui"] forState:UIControlStateNormal];
    [btn sizeToFit];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:btn];
    self.XMTableview.separatorStyle = 1;
}

-(void)initData {
    self.baseDataArray = @[
                           @{@"title" : @"昵称",@"img" : @""},
                           @{@"title" : @"认证",@"img" : @""},
                           @{@"title" : @"标签",@"img" : @""},
                           @{@"title" : @"性别",@"img" : @""},
                           @{@"title" : @"所在地",@"img" : @""},
                           @{@"title" : @"简介",@"img" : @""},
                           @{@"title" : @"公司",@"img" : @""},
                           @{@"title" : @"注册时间",@"img" : @""},
                           ];
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.baseDataArray.count;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    PersonInfoCell * cell = [PersonInfoCell cellWithTalbelView:tableView];
    cell.data = self.baseDataArray[indexPath.row];
    return cell;
}



@end
